<%--
  Created by IntelliJ IDEA.
  User: 小柒的Java
  Date: 2021/6/5
  Time: 16:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>登录</title>
    <style>
        body {
            width: auto;
            height: 90vh;
            background-color: cornflowerblue ;
            background-repeat: no-repeat;
            background-size: 100% 100%;
        }

        .box {
            width: 460px;
            height: 400px;
            margin: 200px auto 0 auto;
            background-color: rgba(255, 255, 255, .5);
            border-radius: 5px;
            box-shadow: 0 0 5px dodgerblue;
        }

        .box h1 {
            text-align: center;
            padding: 30px 0 20px 0;
            border-bottom: 1px solid white;
            font-family: 楷体;
            font-weight: bold;
        }

        .usernamebg, .passwordbg,.vcodebg {
            margin: 20px 80px;
            text-align: center;
        }

        .usernamebg input, .passwordbg input{
            width: 64%;
            outline: none;
            border: 1px solid #ccc;
            border-radius: 5px;
            padding: 10px 10px;
            background-color: white;
            margin-left: 10px;
        }
        .vcodebg input{
            width: 30%;
            outline: none;
            border: 1px solid #ccc;
            border-radius: 5px;
            padding: 10px 10px;
            background-color: white;
            margin-left: 10px;
        }
        .vcodebg img{
            position: relative;
            top: 14px;
        }
        label {
            margin: 0;
            padding: 0;
        }

        input[type=submit] {
            width: 60%;
            height: 46px;
            line-height: 46px;
            background-color: #1e90ff;
            border: 1px solid white;
            margin: 20px 20%;
            border-radius: 5px;
            color: white;
            font-size: 18px;

        }

        input[type=submit]:active {
            background-color: #1e90ffaa;
        }
    </style>
    <script>
        function loadVcode(obj){
            obj.src = "${pageContext.request.contextPath}/codeUtilServlet";
        }
    </script>
</head>
<body>
<form action="${pageContext.request.contextPath}/login" method="post">
    <div class="box">
        <h1>用户登录</h1>
        <%-- 用户名--%>
        <span>${msg}</span>
        <div class="usernamebg">
            <label for="username">用户名</label>
            <input type="text" placeholder="请输入用户名" name="username" id="username" autocomplete="false">
        </div>
        <%-- 密码--%>
        <div class="passwordbg">
            <label>密<span style="color: transparent">码</span>码</label>
            <input type="password" placeholder="请输入用户密码" name="password" id="password" autocomplete="false">
        </div>
        <%-- 验证码--%>
        <div class="vcodebg">
            <label>验证码</label>
            <input type="text" placeholder="输入验证码" name="vCode">
            <img src="${pageContext.request.contextPath}/codeUtilServlet" style="width: 100px;height: 35px;" onclick="javascript:this.src=this.src+'?'">

        </div>
        <%-- 按钮--%>
        <input type="submit" value="登   录">

    </div>
</form>

</body>
</html>
